package cn.edu.bnu.bnuboy.xiaohua;

import java.util.ArrayList;



import android.app.Activity;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class ReciteListActivity extends Activity {
	SQLiteDatabase db;
	Cursor c;
	private ListView lv;
	String[] str = new String[30];
	
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.test_list);
		lv = (ListView)this.findViewById(R.id.unitlist);
		for(int i = 0;i < 30; i ++){
			str[i] = "List " + (i + 1);
		}
		ArrayAdapter<String> ad = new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1, str);
		lv.setAdapter(ad);
		lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {

			public void onItemClick(AdapterView<?> arg0, View arg1,int pos, long arg3) {
				Intent intent = new Intent();
				intent.setClass(ReciteListActivity.this, ReciteWordsActivity.class);
				intent.putExtra("list", pos);
				startActivity(intent);
				
			}
		});
	}

}
